package client

import akka.actor.{ActorSystem, Props}
import com.typesafe.config.ConfigFactory
import server.ServerActor

/**
 * Created by sjzx on 2016/5/16.
 */
object ClientMain extends App {
  val system = ActorSystem("clientSys", ConfigFactory.load.getConfig("client"))
  val serverActor = system.actorOf(Props[ServerActor], name = "serverActor") //the 3rd way to create actor  system will find the actor name in the config if exist Create it.
  val serverActor2 = system.actorOf(Props[ServerActor], name = "serverActor2") //the 3rd way to create actor
  println(serverActor.path)
  println(serverActor2.path)
  val clientActor = system.actorOf(Props(new ClientActor()), "client")
//  clientActor ! "START"
}
